package com.biz.primus.ms.geo.dao.ro;

import com.biz.primus.base.enums.CommonStatus;
import com.biz.primus.base.redis.bean.BaseRedisObject;
import com.biz.primus.ms.geo.dao.po.AbstractAreaWithCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.math.BigDecimal;

/**
 * @author JKLiues
 * @date 2017/11/8
 */
@Getter
@Setter
@NoArgsConstructor
public abstract class AbstractAreaRo extends BaseRedisObject<Integer> {

    private static final long serialVersionUID = 674615016492828756L;
    protected String code;

    protected String name;

    protected Integer idx;

    protected Integer weight = 0;

    protected String coordinate;

    protected BigDecimal lat;

    protected BigDecimal lon;

    protected String baiduname;

    protected String description;

    protected Integer baiducode;

    protected String post;

    protected String prefix;

    protected CommonStatus status;

    public AbstractAreaRo(AbstractAreaWithCode po) {
        this.baiducode = po.getBaiducode();
        this.setId(po.getId());
        this.code = po.getCode();
        this.baiduname = po.getBaiduname();
        this.coordinate = po.getCoordinate();
        this.description = po.getDescription();
        this.idx = po.getIdx();
        this.lat = po.getLat();
        this.lon = po.getLon();
        this.name = po.getName();
        this.post = po.getPost();
        this.weight = po.getWeight();
        this.prefix = po.getPrefix();
        this.status = po.getStatus();
    }

}
